*Table A.25: Meal and Snack treatment effects on adults’ incentivized food preferences
cd ""

use "master_data_adults_child_s13456_shared.dta", clear 

drop if type_id=="X" // **Dropping newborns born during the three years of study
drop if id=="3885553B" //**error in the id number and empty data
drop if id=="3885553G" //**error in the id number and empty data
replace treatment=2 if id=="38855553B" //**retrieving the correct treatment for this id
replace treatment=2 if id=="38855553G" //**retrieving the correct treatment for this id
drop if id=="101aa22c" //**this id does not exist
drop if id=="27655663" //**outlier on many measurements

**measured only in Essex Before and After
keep if (session==1 | session==3) & edi==0
bys session edi: tab nb_healthy_choices2

gen nb_healthy_choices_all=nb_healthy_choices if session==1
replace nb_healthy_choices_all=nb_healthy_choices2 if session==3

bys session edi: tab nb_healthy_choices_all
xi: xtreg nb_healthy_choices_all i.treatment*i.session if edi==0, fe i(id_nb)